import request from './request';
import { getParamsString } from '../utils';


// var uniacid = JSON.parse(localStorage.getItem('localUniacid'));

const uniacid = getParamsString('uniacid');



export const updateAvatar = async (config) => {
  // 更新头像
  let res = await request({
    params: {
      action: 'shop_img'
    },
    data: {
      img: config,
      uniacid: uniacid
    }
  })

  return res.data
}

export const getAddress = async () => {
  // 获取地址
  let res = await request({
    params: {
      "action": 'address_show'
    },
    data: {
      uniacid: uniacid
    }
  })
  return res.data
}

export const getStoreName = async () => {
  //  获取入驻商家 name
  let res = await request({
    params: {
      action: 'store_name',
    },
    data: {
      uniacid: uniacid
    }
  })
  return res.data
}